<template>
	<bigScreenContainer autoFullScreen>
		<div class="bgPage">
			<div class="HomePageClass" id="HomePageClass">
				<div class="page_header" :style="{
            background: `url(${componentContent.imageMap['daohang']}) no-repeat`,
            'background-size': '100% 100%',
          }">
					<span>生产运营看板二</span>
				</div>
				<div class="homeContent">
					<div class="bottomArea">
						<div class="bottom_left">
							<div class="title_guangyun" :style="{
                  background: `url(${componentContent.imageMap['guangyun']}) no-repeat`,
                  'background-size': '100% 100%',
                }"></div>
							<div class="title_sb">
								<div class="title_bg" :style="{
                    background: `url(${componentContent.imageMap['titlebg']}) no-repeat`,
                    'background-size': '100% 100%',
                  }">
									<span>库存分布</span>
								</div>
							</div>
							<div class="chart_sb" ref="optionBar2"></div>
						</div>
						<div class="bottom_right">
							<div class="title_guangyun" :style="{
                  background: `url(${componentContent.imageMap['guangyun']}) no-repeat`,
                  'background-size': '100% 100%',
                }"></div>
							<div class="title_sb">
								<div class="title_bg" :style="{
                    background: `url(${componentContent.imageMap['titlebg']}) no-repeat`,
                    'background-size': '100% 100%',
                  }">
									<span>库存趋势图</span>
								</div>
							</div>
							<div class="chart_sb" ref="optionBar1"></div>
						</div>
					</div>
					<div class="bottomArea">
						<div class="bottom_left">
							<div class="title_guangyun" :style="{
                  background: `url(${componentContent.imageMap['guangyun']}) no-repeat`,
                  'background-size': '100% 100%',
                }"></div>
							<div class="title_sb">
								<div class="title_bg" :style="{
                    background: `url(${componentContent.imageMap['titlebg']}) no-repeat`,
                    'background-size': '100% 100%',
                  }">
									<span>库存周转天数</span>
								</div>
							</div>
							<div class="chart_sb" ref="optionBar3"></div>
						</div>
						<div class="bottom_right">
							<div class="title_guangyun" :style="{
                  background: `url(${componentContent.imageMap['guangyun']}) no-repeat`,
                  'background-size': '100% 100%',
                }"></div>
							<div class="title_sb">
								<div class="title_bg" :style="{
                    background: `url(${componentContent.imageMap['titlebg']}) no-repeat`,
                    'background-size': '100% 100%',
                  }">
									<span>供应商交付及时率</span>
								</div>
							</div>
							<div class="chart_sb" ref="optionBar4"></div>
						</div>
					</div>
					<div class="bottomArea">
						<div class="bottom_left">
							<div class="title_guangyun" :style="{
                  background: `url(${componentContent.imageMap['guangyun']}) no-repeat`,
                  'background-size': '100% 100%',
                }"></div>
							<div class="title_sb">
								<div class="title_bg" :style="{
                    background: `url(${componentContent.imageMap['titlebg']}) no-repeat`,
                    'background-size': '100% 100%',
                  }">
									<span>生产计划完成率（换热器）</span>
								</div>
							</div>
							<div class="chart_sb" ref="optionBar5"></div>
						</div>
						<div class="bottom_right">
							<div class="title_guangyun" :style="{
                  background: `url(${componentContent.imageMap['guangyun']}) no-repeat`,
                  'background-size': '100% 100%',
                }"></div>
							<div class="title_sb">
								<div class="title_bg" :style="{
                    background: `url(${componentContent.imageMap['titlebg']}) no-repeat`,
                    'background-size': '100% 100%',
                  }">
									<span>生产计划完成率（HVAC）</span>
								</div>
							</div>
							<div class="chart_sb" ref="optionBar6"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</bigScreenContainer>
</template>
<script>
	// import * as echarts from "echarts";

export default {
  name: "sjkbView", // 研发
  data() {
    return {
      componentContent,
      nowYear: "",
      nowMonth: "",
      monthData: [
        "1月",
        "2月",
        "3月",
        "4月",
        "5月",
        "6月",
        "7月",
        "8月",
        "9月",
        "10月",
        "11月",
        "12月",
      ],
      data1: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      data2: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      data3: [],
      data4: [],
      data5: [],
      data6: 0,
      data7: 0,
      data8: [],
      data9: []
    };
  },
  computed: {
    optionBar1() {
      return {
        color: ["#5470C6"],
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
          },
          borderWidth: 0, // 边框宽度（可选）
          backgroundColor: "rgba(0, 91, 174, 0.8)", // 背景颜色（支持透明度）
          textStyle: {
            color: "#ffffff", // 文字颜色
          },
        },
        grid: {
          left: "5%",
          right: "3%",
          top: "20%",
          bottom: "10%",
        },
        toolbox: {},
        legend: {
          data: ["库存趋势"],
          top: 10,
          right: 20,
          itemWidth: 14, // 图标宽度
          itemHeight: 14, // 图标高度
          textStyle: {
            color: "#ffffff", // 字体颜色
            fontSize: 14, // 字号
            fontFamily: "Arial", // 字体
            padding: [0, 0, 0, 0], // 文本左侧间距
          },
        },
        xAxis: [
          {
            type: "category",
            axisTick: {
              alignWithLabel: true,
            },
            axisLine: {
              lineStyle: {
                color: "rgba(255,255,255,0.2)",
              },
            },
            // prettier-ignore
            data: this.monthData,
            axisLabel: {
              color: "#ffffff",
              formatter: "{value}",
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: "单位 : %", // 通用名称（或根据需求自定义）
            position: "left", // 统一放在左侧
            axisLine: {
              show: false,
            },
            nameTextStyle: {
              color: "rgba(255,255,255,0.8)",
              padding: [0, 25, 0, 0], // 调整旋转后的位置
            },
            axisLabel: {
              color: "#ffffff",
              fontWeight: 700,
              formatter: "{value}",
            },
            splitLine: {
              lineStyle: {
                type: "dashed", // 设置横线为虚线
                color: "rgba(255,255,255,0.2)", // 可选：设置虚线颜色（带透明度）
              },
            },
          },
        ],
        series: [
          {
            name: "库存趋势",
            type: "line",
            barWidth: 12,
            data: this.data1,
            itemStyle: {
              color: {
                type: "linear", // 线性渐变
                x: 0, // 右方向
                y: 0, // 下方向
                x2: 0, // 左方向（0表示垂直渐变）
                y2: 1, // 底部终点
                colorStops: [
                  {
                    offset: 1,
                    color: "#2378f7", // 0%处的颜色
                  },
                  {
                    offset: 0,
                    color: "#83bff6", // 100%处的颜色
                  },
                ],
              },
            },
          },
        ],
      };
    },
    optionBar2() {
      return {
        tooltip: {
          trigger: "item",
          backgroundColor: "rgba(0, 0, 0, 0.7)",
          borderColor: "#00c0ff",
          borderWidth: 1,
          padding: 10,
          textStyle: {
            color: "#fff",
            fontSize: 14,
            fontFamily: "Arial",
          },
          formatter: (params) => {
            return `
              <div style="line-height:1.5">
                <strong style="font-size:15px;">${params.name}</strong><br/>
                数值：${params.value}<br/>
                占比：${params.percent}%
              </div>
            `;
          },
        },
        legend: {
          orient: "vertical",
          left: "15%",
          top: "center",
          textStyle: {
            color: "#fff",
          },
        },
        series: [
          {
            name: "Access From",
            type: "pie",
            radius: "90%",
            center: ["60%", "50%"],
            data: this.data3,
            label: {
              show: true,
              position: "inner",
              color: "#fff",
              fontSize: 12,
              formatter: (params) => {
                return `{a|${params.name}}\n{c|${params.percent}}%`;
              },
              rich: {
                a: {
                  fontSize: 13,
                  color: "#fff",
                  fontWeight: "bold",
                },
                b: {
                  color: "#fff",
                },
                c: {
                  color: "#fff",
                },
              },
            },
            labelLine: {
              show: false, // 如需更简洁可隐藏连接线
            },
          },
        ],
      };
    },
    optionBar3() {
      return {
        color: ["#5470C6"],
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
          },
          borderWidth: 0, // 边框宽度（可选）
          backgroundColor: "rgba(0, 91, 174, 0.8)", // 背景颜色（支持透明度）
          textStyle: {
            color: "#ffffff", // 文字颜色
          },
        },
        grid: {
          left: "5%",
          right: "3%",
          top: "20%",
          bottom: "10%",
        },
        toolbox: {},
        legend: {
          data: ["库存周转天数"],
          top: 10,
          right: 20,
          itemWidth: 14, // 图标宽度
          itemHeight: 14, // 图标高度
          textStyle: {
            color: "#ffffff", // 字体颜色
            fontSize: 14, // 字号
            fontFamily: "Arial", // 字体
            padding: [0, 0, 0, 0], // 文本左侧间距
          },
        },
        xAxis: [
          {
            type: "category",
            axisTick: {
              alignWithLabel: true,
            },
            axisLine: {
              lineStyle: {
                color: "rgba(255,255,255,0.2)",
              },
            },
            // prettier-ignore
            data: this.monthData,
            axisLabel: {
              color: "#ffffff",
              formatter: "{value}",
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: "单位 : 天", // 通用名称（或根据需求自定义）
            position: "left", // 统一放在左侧
            axisLine: {
              show: false,
            },
            nameTextStyle: {
              color: "rgba(255,255,255,0.8)",
              padding: [0, 25, 0, 0], // 调整旋转后的位置
            },
            axisLabel: {
              color: "#ffffff",
              fontWeight: 700,
              formatter: "{value}",
            },
            splitLine: {
              lineStyle: {
                type: "dashed", // 设置横线为虚线
                color: "rgba(255,255,255,0.2)", // 可选：设置虚线颜色（带透明度）
              },
            },
          },
        ],
        series: [
          {
            name: "库存周转天数",
            type: "bar",
            // smooth: true,
            barWidth: 18,
            data: this.data2,
            itemStyle: {
              color: {
                type: "linear", // 线性渐变
                x: 0, // 右方向
                y: 0, // 下方向
                x2: 0, // 左方向（0表示垂直渐变）
                y2: 1, // 底部终点
                colorStops: [
                  {
                    offset: 1,
                    color: "#2378f7", // 0%处的颜色
                  },
                  {
                    offset: 0,
                    color: "#83bff6", // 100%处的颜色
                  },
                ],
              },
            },
          },
        ],
      };
    },
    optionBar4() {
      return {
        color: ["#5470C6"],
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
          },
          borderWidth: 0,
          backgroundColor: "rgba(0, 91, 174, 0.8)",
          textStyle: {
            color: "#ffffff",
          },
        },
        grid: {
          left: "5%",
          right: "3%",
          top: "20%",
          bottom: "10%",
        },
        toolbox: {},
        legend: {
          data: ["交付及时率"],
          top: 10,
          right: 20,
          itemWidth: 14,
          itemHeight: 14,
          textStyle: {
            color: "#ffffff",
            fontSize: 14,
            fontFamily: "Arial",
            padding: [0, 0, 0, 0],
          },
        },
        xAxis: [
          {
            type: "category",
            axisTick: {
              alignWithLabel: true,
            },
            axisLine: {
              lineStyle: {
                color: "rgba(255,255,255,0.2)",
              },
            },
            data: this.data5, // e.g., ["1月", "2月", "3月", ..., "12月"]
            axisLabel: {
              color: "#ffffff",
              formatter: "{value}",
              interval: 0, // 强制显示所有标签
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: "单位 : %",
            position: "left",
            axisLine: {
              show: false,
            },
            nameTextStyle: {
              color: "rgba(255,255,255,0.8)",
              padding: [0, 25, 0, 0],
            },
            axisLabel: {
              color: "#ffffff",
              fontWeight: 700,
              formatter: "{value}",
            },
            splitLine: {
              lineStyle: {
                type: "dashed",
                color: "rgba(255,255,255,0.2)",
              },
            },
          },
        ],
        dataZoom: [
          {
            type: "slider",
            show: false,
            xAxisIndex: 0,
            startValue: 0,
            endValue: 9, // 显示第 0 到第 9 项（共 10 条）
          },
        ],
        series: [
          {
            name: "交付及时率",
            type: "bar",
            barWidth: 18,
            data: this.data4,
            itemStyle: {
              color: {
                type: "linear",
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  { offset: 1, color: "#83bff6" },
                  { offset: 0, color: "#2378f7" },
                ],
              },
            },
          },
        ],
      };
    },
    optionBar5() {
      return {
        tooltip: {
          formatter: "{a} <br/>{c}%",
        },
        series: [
          {
            name: "完成率",
            type: "gauge",
            startAngle: 180,
            endAngle: 0,
            center: ["50%", "80%"],
            radius: "150%",
            progress: {
              show: true,
              width: 8,
            },
            axisLine: {
              lineStyle: {
                width: 8,
              },
            },
            axisLabel: {
              color: "#ffffff",
            },
            axisTick: {
              lineStyle: {
                color: "#ffffff",
              },
            },
            splitLine: {
              lineStyle: {
                color: "#ffffff",
              },
            },
            detail: {
              show: false, // 不显示 value
            },
            title: {
              color: "#ffffff", // 修改 name（标题）颜色
              offsetCenter: [0, "15%"], // 位置可根据需要调整
              fontSize: 20,
            },
            data: [
              {
                value: this.data6,
                name: this.data6 + " %", // 名称
              },
            ],
          },
        ],
      };
    },
    optionBar6() {
      return {
        tooltip: {
          formatter: "{a} <br/>{c}%",
        },
        series: [
          {
            name: "完成率",
            type: "gauge",
            startAngle: 180,
            endAngle: 0,
            center: ["50%", "80%"],
            radius: "150%",
            progress: {
              show: true,
              width: 8,
            },
            axisLine: {
              lineStyle: {
                width: 8,
              },
            },
            axisLabel: {
              color: "#ffffff",
            },
            axisTick: {
              lineStyle: {
                color: "#ffffff",
              },
            },
            splitLine: {
              lineStyle: {
                color: "#ffffff",
              },
            },
            detail: {
              show: false, // 不显示 value
            },
            title: {
              color: "#ffffff", // 修改 name（标题）颜色
              offsetCenter: [0, "15%"], // 位置可根据需要调整
              fontSize: 20,
            },
            data: [
              {
                value: this.data7,
                name: this.data7 + " %", // 名称
              },
            ],
          },
        ],
      };
    },
        optionBar7() {
      return {
        color: ["#5470C6"],
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
          },
          borderWidth: 0, // 边框宽度（可选）
          backgroundColor: "rgba(0, 91, 174, 0.8)", // 背景颜色（支持透明度）
          textStyle: {
            color: "#ffffff", // 文字颜色
          },
        },
        grid: {
          left: "5%",
          right: "3%",
          top: "20%",
          bottom: "10%",
        },
        toolbox: {},
        legend: {
          data: ["生产计划完成率"],
          top: 10,
          right: 20,
          itemWidth: 14, // 图标宽度
          itemHeight: 14, // 图标高度
          textStyle: {
            color: "#ffffff", // 字体颜色
            fontSize: 14, // 字号
            fontFamily: "Arial", // 字体
            padding: [0, 0, 0, 0], // 文本左侧间距
          },
        },
        xAxis: [
          {
            type: "category",
            axisTick: {
              alignWithLabel: true,
            },
            axisLine: {
              lineStyle: {
                color: "rgba(255,255,255,0.2)",
              },
            },
            // prettier-ignore
            data: this.monthData,
            axisLabel: {
              color: "#ffffff",
              formatter: "{value}",
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: "单位 : %", // 通用名称（或根据需求自定义）
            position: "left", // 统一放在左侧
            axisLine: {
              show: false,
            },
            nameTextStyle: {
              color: "rgba(255,255,255,0.8)",
              padding: [0, 25, 0, 0], // 调整旋转后的位置
            },
            axisLabel: {
              color: "#ffffff",
              fontWeight: 700,
              formatter: "{value}",
            },
            splitLine: {
              lineStyle: {
                type: "dashed", // 设置横线为虚线
                color: "rgba(255,255,255,0.2)", // 可选：设置虚线颜色（带透明度）
              },
            },
          },
        ],
        series: [
          {
            name: "生产计划完成率",
            type: "bar",
            // smooth: true,
            barWidth: 18,
            data: this.data8,
            itemStyle: {
              color: {
                type: "linear", // 线性渐变
                x: 0, // 右方向
                y: 0, // 下方向
                x2: 0, // 左方向（0表示垂直渐变）
                y2: 1, // 底部终点
                colorStops: [
                  {
                    offset: 1,
                    color: "#2378f7", // 0%处的颜色
                  },
                  {
                    offset: 0,
                    color: "#83bff6", // 100%处的颜色
                  },
                ],
              },
            },
          },
        ],
      };
    },
    optionBar8() {
      return {
        color: ["#5470C6"],
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
          },
          borderWidth: 0,
          backgroundColor: "rgba(0, 91, 174, 0.8)",
          textStyle: {
            color: "#ffffff",
          },
        },
        grid: {
          left: "5%",
          right: "3%",
          top: "20%",
          bottom: "10%",
        },
        toolbox: {},
        legend: {
          data: ["生产计划完成率"],
          top: 10,
          right: 20,
          itemWidth: 14,
          itemHeight: 14,
          textStyle: {
            color: "#ffffff",
            fontSize: 14,
            fontFamily: "Arial",
            padding: [0, 0, 0, 0],
          },
        },
        xAxis: [
          {
            type: "category",
            axisTick: {
              alignWithLabel: true,
            },
            axisLine: {
              lineStyle: {
                color: "rgba(255,255,255,0.2)",
              },
            },
            data: this.data5, // e.g., ["1月", "2月", "3月", ..., "12月"]
            axisLabel: {
              color: "#ffffff",
              formatter: "{value}",
              interval: 0, // 强制显示所有标签
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: "单位 : %",
            position: "left",
            axisLine: {
              show: false,
            },
            nameTextStyle: {
              color: "rgba(255,255,255,0.8)",
              padding: [0, 25, 0, 0],
            },
            axisLabel: {
              color: "#ffffff",
              fontWeight: 700,
              formatter: "{value}",
            },
            splitLine: {
              lineStyle: {
                type: "dashed",
                color: "rgba(255,255,255,0.2)",
              },
            },
          },
        ],
        dataZoom: [
          {
            type: "slider",
            show: false,
            xAxisIndex: 0,
            startValue: 0,
            endValue: 9, // 显示第 0 到第 9 项（共 10 条）
          },
        ],
        series: [
          {
            name: "生产计划完成率",
            type: "bar",
            barWidth: 18,
            data: this.data9,
            itemStyle: {
              color: {
                type: "linear",
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  { offset: 1, color: "#83bff6" },
                  { offset: 0, color: "#2378f7" },
                ],
              },
            },
          },
        ],
      };
    },
  },
  async created() {
    this.nowYear = new Date().getFullYear();
    this.nowMonth = new Date().getMonth() + 1;
    console.log(this.nowYear, this.nowMonth);
  },
  async mounted() {
    await Promise.all([
      this.getData1(),
      this.getData2(),
      this.getData3(),
      this.getData4(),
      this.getData5(),
      this.getData6(),
    ]).then(([result1, result2, result3, result4, result5, result6]) => {
      console.log("所有请求完成：");
      console.log(
        "数据:",
        result1,
        result2,
        result3,
        result4,
        result5,
        result6
      );
      if (result1.length > 0) {
        if (result1[0].value === "0") {
          let thisYearData = result2.filter((i) => {
            return i.year.includes(this.nowYear + "");
          });
          if (thisYearData.length > 0) {
            let initData = JSON.parse(thisYearData[0].str);
            let filterData1 = initData.filter((i) => {
              return i.name == "库存趋势";
            });
            if (filterData1.length > 0) {
              this.setMonthData(filterData1, this.data1);
            }
            let filterData2 = initData.filter((i) => {
              return i.name == "库存周转天数";
            });
            if (filterData2.length > 0) {
              this.setMonthData(filterData2, this.data2);
            }
                        let filterData3 = initData.filter((i) => {
              return i.name == "(换热器)生产计划完成率";
            });
            if (filterData3.length > 0) {
              this.setMonthData(filterData3, this.data8);
            }
                        let filterData4 = initData.filter((i) => {
              return i.name == "(HVAC)生产计划完成率";
            });
            if (filterData4.length > 0) {
              this.setMonthData(filterData4, this.data9);
            }
          }
          if (result3.length > 0)
            this.data3 = result3.map((i) => {
              return {
                value: Number(i.material_num),
                name: i.material_type,
              };
            });
          if (result4.length > 0)
            this.data4 = result4.map((i) => {
              return Number(i.value);
            });
          if (result4.length > 0)
            this.data5 = result4.map((i) => {
              return i.supplier;
            });
          if (result5.length > 0) this.data6 = Number(result5[0].value);
          if (result6.length > 0) this.data7 = Number(result6[0].value);
        }
      }
      this.$nextTick(() => {
        echarts.init(this.$refs.optionBar1).setOption(this.optionBar1);
        echarts.init(this.$refs.optionBar2).setOption(this.optionBar2);
        echarts.init(this.$refs.optionBar3).setOption(this.optionBar3);
        this.chart = echarts.init(this.$refs.optionBar4);
        this.chart.setOption(this.optionBar4);
        this.autoScroll();

        echarts.init(this.$refs.optionBar5).setOption(this.optionBar7);
        echarts.init(this.$refs.optionBar6).setOption(this.optionBar8);
      });
    });
  },
  beforeDestroy() {},
  methods: {
    autoScroll() {
      let zoomSize = 10; // 每次滚动的项数
      let currentIndex = 0;
      const total = this.data5.length;
      this.timer = setInterval(() => {
        if (!this.chart) return;
        this.chart.dispatchAction({
          type: "dataZoom",
          startValue: currentIndex,
          endValue: currentIndex + zoomSize - 1,
        });
        currentIndex++;
        if (currentIndex > total - zoomSize) {
          currentIndex = 0;
        }
      }, 2000); // 每 2 秒滚动一次
    },
    getData1() {
      return new Promise((resolve, reject) => {
        this.WitGlobal.requestCode("main.main.querySource", {}).then((res) => {
          if (res.code == 200) {
            resolve(res.data);
          } else {
            reject("err");
          }
        });
      });
    },
    getData2() {
      return new Promise((resolve, reject) => {
        this.WitGlobal.requestCode("main.main.queryProduce2", {}).then(
          (res) => {
            if (res.code == 200) {
              resolve(res.data);
            } else {
              reject("err");
            }
          }
        );
      });
    },
    getData3() {
      return new Promise((resolve, reject) => {
        this.WitGlobal.requestCode("main.main.queryStore", {}).then((res) => {
          if (res.code == 200) {
            resolve(res.data);
          } else {
            reject("err");
          }
        });
      });
    },
    getData4() {
      return new Promise((resolve, reject) => {
        this.WitGlobal.requestCode("main.main.querySupplierTime", {}).then(
          (res) => {
            if (res.code == 200) {
              resolve(res.data);
            } else {
              reject("err");
            }
          }
        );
      });
    },
    getData5() {
      return new Promise((resolve, reject) => {
        this.WitGlobal.requestCode("main.main.queryCompleteHrq", {}).then(
          (res) => {
            if (res.code == 200) {
              resolve(res.data);
            } else {
              reject("err");
            }
          }
        );
      });
    },
    getData6() {
      return new Promise((resolve, reject) => {
        this.WitGlobal.requestCode("main.main.queryCompleteHvac", {}).then(
          (res) => {
            if (res.code == 200) {
              resolve(res.data);
            } else {
              reject("err");
            }
          }
        );
      });
    },
    setMonthData(arr = [{}], data) {
      if (this.nowMonth >= 1) data[0] = Number(arr[0].january);
      else data[0] = 0;
      if (this.nowMonth >= 2) data[1] = Number(arr[0].february);
      else data[1] = 0;
      if (this.nowMonth >= 3) data[2] = Number(arr[0].march);
      else data[2] = 0;
      if (this.nowMonth >= 4) data[3] = Number(arr[0].april);
      else data[3] = 0;
      if (this.nowMonth >= 5) data[4] = Number(arr[0].may);
      else data[4] = 0;
      if (this.nowMonth >= 6) data[5] = Number(arr[0].june);
      else data[5] = 0;
      if (this.nowMonth >= 7) data[6] = Number(arr[0].july);
      else data[6] = 0;
      if (this.nowMonth >= 8) data[7] = Number(arr[0].august);
      else data[7] = 0;
      if (this.nowMonth >= 9) data[8] = Number(arr[0].september);
      else data[8] = 0;
      if (this.nowMonth >= 10) data[10] = Number(arr[0].october);
      else data[10] = 0;
      if (this.nowMonth >= 11) data[11] = Number(arr[0].november);
      else data[11] = 0;
      if (this.nowMonth >= 12) data[12] = Number(arr[0].december);
      else data[12] = 0;
    },
  },
};
</script>
<style lang="scss" scoped>
	/* 自定义渐变色进度条 */
	.custom-gradient-progress .el-progress-bar__inner {
		background: linear-gradient(270deg, #00efff 0%, #00527d 100%) !important;
		transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1);
		border-radius: 4px;
	}

	.el-progress-bar__outer {
		background-color: rgb(27, 63, 99);
		height: 3px !important;
		border-radius: 4px;
	}

	.table_ {
		width: 100%;
		height: 270px;
		background: rgba(255, 255, 255, 0);
		position: relative;
		overflow: hidden;
	}

	// rgb(14, 58, 104);
	.table-wrapper {
		position: relative;
		/* 设置表格总高度，包含表头 */
	}

	.table-header {
		/* 表头固定在顶部 */
		position: relative;
		top: 0px;
		height: 40px;
		z-index: 1;
		/* 确保表头在上层 */
	}

	.scroll-wrapper {
		/* 表格内容容器，滚动的部分 */
		// height: 100%;
		/* 隐藏溢出的内容 */
		// position: relative;
		// display: block;
		overflow: hidden;
	}

	.scroll-wrapper .el-table__body {
		/* 内容部分需要启用平滑滚动效果 */
		will-change: transform;
	}

	.no-hover-table .el-table__body tr:hover>td {
		background-color: transparent !important;
	}

	.no-hover-table .el-table__row {
		background-color: rgba(10, 43, 82, 0.99);
		/* 略透明 */
	}

	#no-hover-table {
		background-color: transparent !important;

		td {
			background: rgb(10, 43, 82) !important;
			color: #ffffff;
			height: 40px !important;
			border: 0px solid rgba(25, 198, 255, 0) !important;
			border-top: 1px solid rgb(28, 100, 146) !important;
			border-bottom: 1px solid rgb(28, 100, 146) !important;
		}

		td:first-child {
			border-left: 1px solid rgb(28, 100, 146) !important;
			// border-radius: 6px 0px 0px 6px;
		}

		td:nth-last-child(1) {
			border-right: 1px solid rgb(28, 100, 146) !important;
			// border-radius: 0px 6px 6px 0px;
		}
	}

	.no-hover-table.el-table {
		border: 0px solid #ebeef5;
	}

	.no-hover-table .el-table__body,
	.no-hover-table .el-table__header {
		border-collapse: separate !important;
		border-spacing: 0 4px !important;
		/* 行间距设置在这里！ */
		background: transparent;
	}

	.custom-header-table.el-table {
		background: rgb(8, 47, 84) !important;
		border: 0px solid #ebeef5;
	}

	.el-table td>.cell {
		padding-left: 10px;
	}

	.custom-header-table {

		/* 表头整体样式 */
		.el-table__header-wrapper {
			th {
				background: rgb(8, 47, 84) !important;
				// background: rgb(41, 76, 146) !important;
				// border: 1px solid rgba(25, 198, 255, 0) !important;
				border-bottom: 1px solid rgb(28, 100, 146) !important;
				border-top: 1px solid rgb(28, 100, 146) !important;
				border-left: 1px solid rgb(8, 47, 84) !important;
				border-right: 1px solid rgb(8, 47, 84) !important;
				box-sizing: border-box;

				/* 文字样式 */
				.cell {
					color: #ffffff; // 文字颜色
				}
			}

			th:first-child {
				border-left: 1px solid rgb(28, 100, 146) !important;
			}

			th:nth-last-child(2) {
				border-right: 1px solid rgb(28, 100, 146) !important;
			}

			// /* 表头悬停效果 */
			// tr:hover > th {
			//   background-color: transparent !important;
			// }
		}

		/* 表格边框合并模式 */
		&.el-table--border {
			border-collapse: collapse;

			th:first-child {
				border-left: 1px solid rgba(25, 198, 255, 0.3);
			}

			th:last-child {
				border-right: 1px solid rgba(25, 198, 255, 0.3);
			}
		}

		/* 调整表头高度 */
		.el-table__header {
			tr {
				height: 40px; // 自定义表头高度
			}
		}
	}

	.table-header .el-table {
		height: 40px;
	}

	.page_header {
		height: 80px;
		line-height: 70px;
		background: url(./daohang.png) no-repeat;
		background-size: cover;
		font-weight: 600;
		font-size: 24px;
		text-align: center;

		span {
			// font-weight: 600;
			// font-size: 40px;
			// color: #ffffff;
			// text-shadow: 0px 10px 10px rgba(0, 0, 0, 0.2);
			// background: linear-gradient(0deg, #99bbff 0%, #ffffff 100%);
			// background-clip: text;
			// -webkit-background-clip: text;
			// -webkit-text-fill-color: transparent;
			// text-align: center;
			// padding-top: 36px;
			font-family: "PangMenZhengDao";
			font-size: 38px;
			font-weight: 700;
			line-height: 44.46px;
			letter-spacing: 2px;

			font-variation-settings: "opsz"auto;
			background: linear-gradient(180deg, #ffffff 30%, #90c4ff 81%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
			background-clip: text;
			// text-fill-color: transparent;
			text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.05);
		}
	}

	.bgPage {
		width: 1920px;
		height: 1080px;
		background: #111726;
	}

	.text_color {
		color: #ffffff;
	}

	.text_num_red {
		font-variation-settings: "opsz"auto;
		background: linear-gradient(180deg, #ffffff 48%, #ff5050 83%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		background-clip: text;
	}

	.text_num {
		font-variation-settings: "opsz"auto;
		background: linear-gradient(180deg, #fdfeff 49%, #0ac3ff 83%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		background-clip: text;
		// text-fill-color: transparent;
		text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
	}

	.big_num {
		font-weight: 700;
		font-size: 40px;
	}

	.little_num {
		font-size: 28px;
		font-weight: 700;
	}

	.HomePageClass {
		width: 1920px;
		height: 1080px;
		// background: url(./bg.png) no-repeat;
		background: linear-gradient(90deg, #061726 13%, #003a6d 49%, #061726 86%);
		background-size: cover;
		display: flex;
		flex-direction: column;

		.homeContent {
			display: flex;
			flex-direction: column;
			align-items: center;

			.bottomArea {
				margin-bottom: 20px;
				width: 1920px;
				display: flex;
				justify-content: space-evenly;

				.bottom_left,
				.bottom_right {
					width: 930px;
					height: 308px;
					position: relative;

					.title_guangyun {
						width: 124px;
						height: 70px;
						position: absolute;
						background: url(./guangyun.png) no-repeat;
						background-size: cover;
					}

					.title_sb {
						width: 930px;
						height: 40px;
						background: linear-gradient(90deg,
								rgba(57, 125, 175, 0) -1%,
								rgba(57, 125, 175, 0.15) 48%,
								rgba(57, 125, 175, 0) 100%);
						font-family: Arial;
						font-size: 18px;
						font-weight: normal;
						line-height: 40px;
						letter-spacing: 0px;
						color: #ffffff;
						text-shadow: 0px 2px 24px #00c0ff;

						.title_bg {
							width: 548px;
							height: 40px;
							background: url(./titlebg.png) no-repeat;
							background-size: cover;

							span {
								padding-left: 40px;
							}
						}
					}

					.chart_sb {
						margin-top: 6px;
						width: 930px;
						height: 276px;
						background: linear-gradient(180deg,
								rgba(39, 126, 255, 0.015) -3%,
								rgba(39, 177, 255, 0.12) 100%);
						box-shadow: inset 0px 10px 50px 0px rgba(55, 169, 238, 0.05);
						display: flex;
						justify-content: start;
					}
				}
			}
		}
	}
</style>